<{include file="header.tpl"}>
    <div class="comBox">
        <form name="myform" actiom="" method="POST" onsubmit="return checkpass()">
            <div class="comHeader">
                <h2>添加账号</h3>
            </div>
            <div class="comTable bt">
                <div class="info-block">
                <table class="siteInfo">
                    <tr>
                        <th>用户名：</th>
                        <td><input type='input' name='user_name' class="text" value='' /></td>
                    </tr>
                    <tr>
                        <th>用户密码：</th>
                        <td>
                            <input type='password' name='userpwd' id='userpwd' class="text" value='' />
                            <span id='pwdtest'>(必须大于6位)</span>
                        </td>
                    </tr>
                    <tr>
                        <th>Email：</th>
                        <td>
                            <input type='input' name='email' class="text" value='' />
                        </td>
                    </tr>
                    <tr>
                        <th>用户组：</th>
                        <td>
                            <{foreach from=$cfg_groups.pools.admin.private key=k item=v}>
                            <label><input type='checkbox' name='groups[]' value='admin_<{$k}>' /> <{$v.name}></label>
                            <{/foreach}>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td>
                            <input type="submit" value="提交" class="sub" />
                        </td>
                    </tr>

                </table>
                </div>
            </div>
        </div>
        </form>
    </div>

<script language='javascript'>
    function checkpass()
    {
        if( document.myform.userpwd.value.length < 6 )
        {
            document.getElementById('pwdtest').innerHTML = "<font color='red'>[密码必须大于6位！]</font>";
            return false;
        }
        else
        {
            document.getElementById('pwdtest').innerHTML = "";
            return true;
        }
    }
</script>
<{include file="footer.tpl"}>

